﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.IO;
using ECCIT.Extension.Weibo_v2.Model;
using ECCIT.Extension.Weibo_v2.Common;

namespace OgilvyOne.UKNow.Mobile.APIs.MyCalendar
{
    public class CalendarEvents : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            string userName = context.Request.QueryString["username"];
            string password = context.Request.QueryString["password"];

            if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password))
            {
                UserInfo user = new UserInfo();
                user.Name = userName;
                user.ScreenName = password;
                string output = JsonSerializationHelper.ObjectToJson(user);
                context.Response.Write(output);
            }
            else
            {
                context.Response.Write("Nothing to do");
            }
        }

        public bool IsReusable
        {
            get { return true; }
        }

    }
}
